<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>{{groupId}}</groupId>
   <artifactId>{{artifactId}}</artifactId>
   <version>{{artifactVersion}}</version>
   <packaging>jar</packaging>
   <name>{{artifactId}}</name>
   <description>Demo project for Spring Boot Microservices</description>
   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <java.version>1.8</java.version>
      <spring-boot.version>1.5.6.RELEASE</spring-boot.version>
      <cucumber-junit.version>1.2.5</cucumber-junit.version>
      <cucumber-java.version>1.2.5</cucumber-java.version>
      <cucumber-reporting.version>3.10.0</cucumber-reporting.version>
      <springfox-swagger2>2.6.1-SNAPSHOT</springfox-swagger2>
      <springfox-swagger-ui>2.6.0</springfox-swagger-ui>
      <slf4j-api>1.7.25</slf4j-api>
      <logstash-logback-encoder>4.11</logstash-logback-encoder>
      <logback-core>1.2.3</logback-core>
      <logback-classic>1.2.3</logback-classic>
      <gatling.version>2.3.0</gatling.version>
      <gatling-plugin.version>2.2.4</gatling-plugin.version>
      <scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
      <spring-cloud.version>Camden.SR7</spring-cloud.version>
      <spring-cloud-contract.version>1.1.3.RELEASE</spring-cloud-contract.version>
   </properties>
   <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>1.5.6.RELEASE</version>
      <relativePath />
      <!-- lookup parent from repository -->
   </parent>
   <repositories>
      <repository>
         <id>oss-snapshots</id>
         <name>JFrog OSS Snapshots</name>
         <url>https://oss.jfrog.org/simple/oss-snapshot-local/</url>
         <snapshots>
            <enabled>true</enabled>
         </snapshots>
      </repository>
      <repository>
         <id>central</id>
         <name>Maven Repository Switchboard</name>
         <layout>default</layout>
         <url>https://repo1.maven.org/maven2</url>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
      </repository>
      <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
      </repository>
   </repositories>
   <dependencies>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
         <exclusions>
            <exclusion>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-security</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework.security.oauth</groupId>
         <artifactId>spring-security-oauth2</artifactId>
      </dependency>
      <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
      </dependency>
      {{#eurekaUri}}
      <dependency>
         <groupId>org.springframework.cloud</groupId>
         <artifactId>spring-cloud-starter-eureka</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework.cloud</groupId>
         <artifactId>spring-cloud-starter-eureka-server</artifactId>
      </dependency>
      {{/eurekaUri}}
      <!-- dependency for zipkin tracing with sleuth -->
      {{#zipkinUri}}
      <dependency>
         <groupId>org.springframework.cloud</groupId>
         <artifactId>spring-cloud-starter-zipkin</artifactId>
      </dependency>
      {{/zipkinUri}}
      <!-- if you only want sleuth -->
      <!-- <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-sleuth</artifactId>
               </dependency> -->
      <!-- Sleuth with Zipkin via Spring Cloud Stream -->
      <!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-sleuth-stream</artifactId>
            </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-sleuth</artifactId>
            </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-binder-rabbit</artifactId>
            </dependency> -->
      <!-- Spring Cloud Sleuth Stream Zipkin Collector -->
      <!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
            </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-sleuth</artifactId>
            </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-binder-rabbit</artifactId>
            </dependency> -->
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-actuator</artifactId>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jetty</artifactId>
      </dependency>
      <!--<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix-hystrix-stream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
        </dependency>-->
      <dependency>
         <groupId>org.springframework.cloud</groupId>
         <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-jdbc</artifactId>
      </dependency>
      {{#springBootAdminUri}}
      <dependency>
         <groupId>de.codecentric</groupId>
         <artifactId>spring-boot-admin-starter-client</artifactId>
         <version>1.2.4</version>
      </dependency>
      {{/springBootAdminUri}}
      <dependency>
         <groupId>com.h2database</groupId>
         <artifactId>h2</artifactId>
         <scope>runtime</scope>
      </dependency>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.netflix.hystrix</groupId>
         <artifactId>hystrix-javanica</artifactId>
         <version>1.4.1</version>
      </dependency>
      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
         <version>3.6</version>
      </dependency>
      <dependency>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
          <version>1.2</version>
      </dependency>
      {{#pkmstInterceptor}}
      <!-- PKMST middleware dependency -->
        <dependency>
            <groupId>com.github.rkumar-pk</groupId>
            <artifactId>pkmst-extension</artifactId>
            <version>1.0.1</version>
        </dependency>
        {{/pkmstInterceptor}}
      <!-- cucumber dependencies -->
      <dependency>
         <groupId>info.cukes</groupId>
         <artifactId>cucumber-junit</artifactId>
         <version>${cucumber-junit.version}</version>
      </dependency>
      <dependency>
         <groupId>info.cukes</groupId>
         <artifactId>cucumber-java</artifactId>
         <version>${cucumber-java.version}</version>
      </dependency>
      <dependency>
         <groupId>info.cukes</groupId>
         <artifactId>cucumber-spring</artifactId>
         <version>${cucumber-java.version}</version>
      </dependency>
      <dependency>
         <groupId>net.masterthought</groupId>
         <artifactId>cucumber-reporting</artifactId>
         <version>${cucumber-reporting.version}</version>
      </dependency>
      <dependency>
         <groupId>com.github.tomakehurst</groupId>
         <artifactId>wiremock</artifactId>
         <version>1.46</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.springfox</groupId>
         <artifactId>springfox-swagger2</artifactId>
         <version>${springfox-swagger2}</version>
      </dependency>
      <dependency>
         <groupId>io.springfox</groupId>
         <artifactId>springfox-swagger-ui</artifactId>
         <version>${springfox-swagger-ui}</version>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>${slf4j-api}</version>
      </dependency>
      <dependency>
         <groupId>net.logstash.logback</groupId>
         <artifactId>logstash-logback-encoder</artifactId>
         <version>${logstash-logback-encoder}</version>
      </dependency>
      <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-core</artifactId>
      </dependency>
      <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-classic</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-remote-shell</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jolokia</groupId>
         <artifactId>jolokia-core</artifactId>
      </dependency>
      <!--Gatling -->
      <dependency>
         <groupId>io.gatling.highcharts</groupId>
         <artifactId>gatling-charts-highcharts</artifactId>
         <version>${gatling.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.typesafe</groupId>
         <artifactId>config</artifactId>
         <version>1.3.1</version>
      </dependency>
      <dependency>
         <groupId>com.jayway.restassured</groupId>
         <artifactId>rest-assured</artifactId>
         <version>2.9.0</version>
      </dependency>
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-test</artifactId>
      </dependency>
      <dependency>
            <groupId>org.threeten</groupId>
            <artifactId>threetenbp</artifactId>
            <version>1.4.0</version>
      </dependency>
   </dependencies>
   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>
   <profiles>
      <profile>
         <id>development</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.19.1</version>
                  <configuration>
                     <excludes>
                        <!-- classes that include the name CucumberTest, as an example -->
                        <exclude>**/*CucumberTest*.java</exclude>
                        <!-- classes in a package whose last segment is named cucumber, as
                            an example -->
                        <exclude>**/cucumber/*.java</exclude>
                     </excludes>
                  </configuration>
               </plugin>

               <plugin>
                  <groupId>net.alchim31.maven</groupId>
                  <artifactId>scala-maven-plugin</artifactId>
                  <version>${scala-maven-plugin.version}</version>
               </plugin>
               <!--Enable for Gatling -->
                    <!-- <plugin>
                        <groupId>io.gatling</groupId>
                        <artifactId>gatling-maven-plugin</artifactId>
                        <version>${gatling-plugin.version}</version>
                        <configuration>
                            Run Multiple Simulations
                            <runMultipleSimulations>true</runMultipleSimulations>
                            <includes>
                                <simulationClass>testapi</simulationClass>

                            </includes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>integration-test</phase>
                                <id>gatling</id>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>-->
               <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <configuration>
                     <finalName>${project.name}</finalName>
                  </configuration>
               </plugin>
               <plugin>
                  <groupId>org.jacoco</groupId>
                  <artifactId>jacoco-maven-plugin</artifactId>
                  <version>0.7.7.201606060606</version>
                  <configuration>
                     <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
                     <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
                  </configuration>
                  <executions>
                     <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                           <goal>prepare-agent</goal>
                        </goals>
                     </execution>
                     <execution>
                        <id>jacoco-site</id>
                        <phase>test</phase>
                        <goals>
                           <goal>report</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-site-plugin</artifactId>
                  <version>3.5.1</version>
                  <configuration>
                     <reportPlugins>
                        <plugin>
                           <groupId>org.codehaus.mojo</groupId>
                           <artifactId>findbugs-maven-plugin</artifactId>
                           <version>3.0.4</version>
                        </plugin>
                        <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-checkstyle-plugin</artifactId>
                           <version>2.17</version>
                        </plugin>
                        <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-surefire-report-plugin</artifactId>
                           <version>2.19.1</version>
                        </plugin>
                        <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-pmd-plugin</artifactId>
                        </plugin>
                     </reportPlugins>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>cucumber-tests</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.19.1</version>
                  <configuration>
                     <excludes>
                        <exclude>none</exclude>
                     </excludes>
                     <includes>
                        <!-- Include your Cucumber tests, as an example -->
                        <include>{{serverName}}Test.java</include>
                     </includes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
   <build>
      <pluginManagement>
         <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.springframework.cloud</groupId>
                              <artifactId>spring-cloud-contract-maven-plugin</artifactId>
                              <versionRange>[1.0.1.RELEASE,)</versionRange>
                              <goals>
                                 <goal>convert</goal>
                                 <goal>generateTests</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore />
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
</project>
